Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipeline: Init pipeline api #478

Merged
merged 8 commits into from
Dec 8, 2023
Merged

Conversation

Xieql
Copy link
Contributor

@Xieql Xieql commented Nov 24, 2023

What type of PR is this?

/kind api-change

/kind design

/kind feature

What this PR does / why we need it:

pipeline api of #476

Copy link

netlify bot commented Nov 24, 2023

Deploy Preview for kurator-dev ready!

Name Link
🔨 Latest commit 24c8db2
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/6572cf3fa3b6fe000818bef6
😎 Deploy Preview https://deploy-preview-478--kurator-dev.netlify.app/references/pipeline_v1alpha1_types
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kurator-bot
Copy link
Collaborator

@Xieql: The label(s) kind/design cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this?

/kind api-change

/kind design

/kind feature

What this PR does / why we need it:

pipeline api of #476

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Xieql Xieql force-pushed the init-pipeline-api branch 4 times, most recently from f61fa72 to 906c3fd Compare November 24, 2023 07:38
@Xieql Xieql marked this pull request as draft November 24, 2023 09:27
@Xieql Xieql force-pushed the init-pipeline-api branch from 906c3fd to fc9c562 Compare November 25, 2023 01:17
@Xieql Xieql force-pushed the init-pipeline-api branch from fc9c562 to 0dc78fe Compare December 7, 2023 03:11
@Xieql Xieql marked this pull request as ready for review December 7, 2023 03:12
@Xieql Xieql mentioned this pull request Dec 7, 2023
24 tasks
@Xieql
Copy link
Contributor Author

Xieql commented Dec 7, 2023

@hzxuzhonghu PTAL


// Retries represents how many times this task should be retried in case of task failure.
// +optional
Retries *int `json:"retries,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document the defaut retries, if no retry by default, this can be int

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, default is zero.

// TaskRef is a reference to a predefined task template.
// Users should provide a TaskRef name from a predefined library.
// +optional
TaskRef *TaskRef `json:"taskRef,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems taskRef is not good, it is inner task spec. How about calling TaskTemplate *TaskTemplate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

// Users don't need to configure additional repository information for this task, except for authentication details for private repositories.
// This Predefined Task is origin from https://github.com/tektoncd/catalog/tree/main/task/git-clone/0.9
// Here are the params that user can config:
// - git-secret-name: the secret name of git basic auth, Kurator use this git credential to clone private repo.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how should user provide such secret and with what format

Copy link
Contributor Author

@Xieql Xieql Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add more format details, and tell user how to create it with following Pipeline doc in kurator site

type TaskRef struct {
// TaskType is used to specify the type of the predefined task.
// This is a required field and determines which task template will be used.
TaskType PredefinedTask `json:"taskType"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it as the intree task template Name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it affects which task template will be executed actually

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean rename to Name

// Image specifies the Docker image name.
// More info: https://kubernetes.io/docs/concepts/containers/images
// +optional
Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all the protobuf tag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,we don't need it

@Xieql
Copy link
Contributor Author

Xieql commented Dec 7, 2023

@hzxuzhonghu PTAL

Comment on lines 87 to 92
// https://kurator.dev/docs/fleet-manager/pipeline/
// .gitconfig example:
// | [credential "https://<hostname>"]
// | helper = store
// .git-credentials example:
// | https://<user>:<pass>@<hostname>
Copy link
Member

@hzxuzhonghu hzxuzhonghu Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your comments is not user provided format
This is the right auth secret format
https://tekton.dev/docs/pipelines/auth/#configuring-authentication-for-git

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Signed-off-by: Xieql <[email protected]>
@Xieql
Copy link
Contributor Author

Xieql commented Dec 8, 2023

/label tide/merge-method-squash

@Xieql
Copy link
Contributor Author

Xieql commented Dec 8, 2023

@hzxuzhonghu PTAL

@hzxuzhonghu
Copy link
Member

last comment #478 (comment)

Signed-off-by: Xieql <[email protected]>
@Xieql Xieql marked this pull request as draft December 8, 2023 07:31
Signed-off-by: Xieql <[email protected]>
@Xieql
Copy link
Contributor Author

Xieql commented Dec 8, 2023

For all task, the workspace is automatically and exclusively assigned to the workspace of the pipeline in which this task is located.

so user don't need to set this value

@Xieql
Copy link
Contributor Author

Xieql commented Dec 8, 2023

@hzxuzhonghu PTAL

@Xieql Xieql marked this pull request as ready for review December 8, 2023 08:20
@hzxuzhonghu
Copy link
Member

/lgtm
/approve

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kurator-bot kurator-bot merged commit bee332e into kurator-dev:main Dec 8, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants